class_name Hitbox extends Area2D

signal hit(hurtbox:Hurtbox)

func _init() -> void:
	area_entered.connect(_on_area_enter)

func _on_area_enter(hurtbox: Hurtbox) -> void:
	#print("[hit] %s => %s " % [owner.name, hurtbox.owner.name])
	hit.emit(hurtbox)
	hurtbox.hurt.emit(self)
